go to previous page   go to home page   go to next page

Answer:

The "Do It" button is not needed. The application, when you write it, will change the value in the Ideal Weight box as the user clicks the radio buttons.


BorderLayout

Border Layout

BorderLayout is a frequently used layout manager. The container it manages corresponds to a rectangle on the screen. That rectangle is divided up into five regions:

Each region may hold only one component, although that component may be a panel (and usually is). The panel may contain several components. The layout manager adjusts the size of the regions depending on what is in them. You don't have to put a component in each region. If a region has no component in it, it shrinks to a small area.

BorderLayout is the default layout manager for class JFrame. (Previous examples used FlowLayout by calling setLayout() to change from the default.)


QUESTION 7:

Add the three panels to the frame, genderPanel, heightPanel, resultPanel. Assume that BorderLayout is being used.

// Add Panels to the Frame
setLayout( new BorderLayout() );
add( genderPanel, BorderLayout. );
add( heightPanel, BorderLayout. );
add( resultPanel, BorderLayout. );